package project.teg.games.game.pinch;

import project.teg.configuration.Global;
import project.teg.configuration.Pinch;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PointF;
import android.graphics.RectF;
import android.util.Log;

public class InteractiveObject {

	public PointF locationCenter;
	public PointF initSize;
	public PointF currentSize;
	public PointF finalSize;
	private Paint paint;

	public InteractiveObject() {
		paint = new Paint();
		paint.setColor(Color.BLUE);
		this.locationCenter = new PointF(200, 200);
		initSize = Pinch.objectInitSize;
		currentSize = new PointF(initSize.x, initSize.y);
		finalSize = Pinch.objectFinalSize;
	}

	public void renderObject(Canvas canvas) {

		Paint mPaint = new Paint();
		mPaint.setDither(true);
		mPaint.setColor(Color.WHITE);
		mPaint.setStyle(Paint.Style.STROKE);
		mPaint.setStrokeJoin(Paint.Join.ROUND);
		mPaint.setStrokeCap(Paint.Cap.ROUND);
		mPaint.setStrokeWidth(3);
		
//		Log.e("Iz view-a", currentSize.x + ", " + currentSize.y);
		
		canvas.drawRect(locationCenter.x - currentSize.x / 2, locationCenter.y
				- currentSize.y / 2, locationCenter.x + currentSize.x / 2,
				locationCenter.y + currentSize.y / 2, mPaint);

		canvas.drawRect(locationCenter.x - finalSize.x / 2, locationCenter.y
				- finalSize.y / 2, locationCenter.x + finalSize.x / 2,
				locationCenter.y + finalSize.y / 2, mPaint);
	}
}
